// dgz api
var express = require("express")
var router = express.Router();
var bodyParser = require('body-parser');


router.use(function (req,res,next) {
    console.log("visit dgz api.")
    next();
});
router.use(bodyParser.json());

router.get("/", function(req,res) {
    res.send("root")
});

router.post('/', function (req, res) {
    //JSON.stringify(person)

    console.log(req.body);
    res.json(req.body);
})

router.get("/about", function(req,res) {
    res.send("about2")
});










module.exports = router